package org.googlecode.lightning.search.analyzer;

import net.paoding.analysis.analyzer.PaodingAnalyzer;

import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.cjk.CJKAnalyzer;
import org.apache.lucene.analysis.cn.ChineseAnalyzer;
import org.apache.lucene.analysis.standard.StandardAnalyzer;

/**
 * The factory know how to born analyzer ,eg. ChineseAnalyzer , PaodingAnalyzer
 * 
 * @author daragon
 * 
 */
public class AnalyzerFactory {

	private AnalyzerFactory() {
	}

	/**
	 * Lucene's default Chinese Analyzer .
	 * 
	 * @see
	 * @return
	 */
	public static Analyzer getChineseAnalyzer() {
		return new ChineseAnalyzer();
	}

	/**
	 * Lucene's default Chinese, Japanese, Korean Analyzer .
	 * 
	 * @see
	 * @return
	 */
	public static Analyzer getCJKAnalyzer() {
		return new CJKAnalyzer();
	}

	/**
	 * Paoding Analyzer,it will use the default dictionary which locate in your classpath
	 * paoding-dic-home.properties
	 * 
	 * @return
	 */
	public static Analyzer getPaodingAnalyzer() {
		return new PaodingAnalyzer();
	}

	/**
	 * Lucene's standard analyzer
	 * 
	 * @return
	 */
	public static Analyzer getStandardAnalyzer() {
		return new StandardAnalyzer();
	}
}
